package zone.haiwen.demo.domain.dao;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import zone.haiwen.demo.domain.entity.vo.Myuser;
import org.apache.ibatis.annotations.Param;
import org.mapstruct.Mapper;

import java.util.List;

/**
 * Description: Mapper接口
 * @author zhangHaiWen
 * @data 2021/7/7 19:51
 * @return
 **/
@Mapper
public interface MyuserMapper extends BaseMapper<Myuser> {
	// 方法名自动对应
	public Myuser getUserByName(@Param("name") String name);
	public List<Myuser> getUserByAge(@Param("age") int age);
	public void insertUser(@Param("id") Long id, @Param("name") String name, @Param("age") Integer age, @Param("email") String email);
	public void updateUser(@Param("id") Long id, @Param("name") String name, @Param("age") Integer age, @Param("email") String email);
	public void deleteUserById(@Param("id") Long id);
	public Myuser queryUserIf(@Param("id") Long id, @Param("name") String name);
	public List<Myuser> queryUserChoose(@Param("name") String name, @Param("age") Integer age);
	public List<Myuser> queryUserWhere(@Param("name") String name, @Param("age") Integer age);
	public List<Myuser> queryUserForeach(@Param("list") List<Long> list);
}
